<#include "/WEB-INF/template/common/macro/libs.ftl"/>
<html>
<head>
    <link href="${CONTEXT_PATH}/plugin/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"
          type="text/css"/>
    <link href="${CONTEXT_PATH}/plugin/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
<@libs_bootstrap_css/>
<@libs_jquery_1_10_2/>
<@libs_ztree_css/>
<@libs_ztree_js/>

    <script type="text/javascript">
        var TreeSetting = {
            check: {
                enable: true,
                chkStyle: "radio",
                radioType: "all"
            },
            data: {
                simpleData: {
                    enable: true,
                    idKey: "id",
                    pIdKey: "pid",
                    rootPId: "1"
                },
                key: {
                    name: "name",
                    children: "childs"
                }
            },
            callback: {
                onClick: function (event, treeId, treeNode, clickFlag) {
                }
            }
        };

        $(document).ready(function () {
            //初始化树节点选择
            var treedata = ${menujson}[0];
            if (window.parent.PageTreeSetting) {
                TreeSetting = $.extend(TreeSetting, window.parent.PageTreeSetting);
            }
            $.fn.zTree.init($("#treediv"), TreeSetting, treedata);
            var tree = $.fn.zTree.getZTreeObj("treediv");
            tree.expandAll(true);
        })
    </script>
</head>
<body>
<div>
<#--<div class="panel panel-default">-->
<#--<div class="panel-heading">Panel heading without title</div>-->
<#--<div class="panel-body">-->
    <ul id="treediv" class="ztree"></ul>
<#--</div>-->
<#--</div>-->
<#--</div>-->
</body>
</html>